<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>The List of All Items by (Company Name)</title>
</head>
<%@ page import="controllers.Accessdb" %>
<body>
	<span><strong>The List Of All Items By (Company Name)</strong></span>
	
	<%
 	Accessdb idc = new Accessdb();
	
	String company = request.getParameter("companyname");
	System.out.println(company);

 	ArrayList<String[]> resultList = idc.getListOfItemCompany(company);

	%>
	
	
	<table border="1" cellspacing="0" cellpadding="0">
		<tr>
			<td>Advertisement_ID</td>
			<td>Company</td>
			<td>Item_Name</td>
			<td>Unit_Price</td>
			<td>Available_Units</td>
			
		</tr>
		
		<% 
	 			for(int i=0; i< resultList.size(); i++){
					out.println("<tr>");
					for(int j=0; j<resultList.get(i).length; j++){
						
	 					out.println("<td>" + resultList.get(i)[j] + "</td>");		
					
					
	 				}
					out.println("</tr>");
	 			}
					
		%>

		
	
	
	</table>
	
	
	
</body>
</html>